﻿using System;

namespace RAP.Web.Libary.Service.Attributes
{
  /// <summary>
  /// 服务的作用域属性
  /// </summary>
  [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
  public class ServiceScopeAttribute : Attribute
  {
    /// <summary>
    /// 注册服务时用的类型/接口
    /// </summary>
    public Type ServiceType { get; set; }

    /// <summary>
    /// 作用域类型，默认Scoped
    /// </summary>
    public ServiceScopeTypes ScopeType { get; set; } = ServiceScopeTypes.Scoped;
  }
}
